#include "stdafx.h"
#include "WorldBuilder.h"
#include "Draggable.h"

Draggable::Draggable()
: m_dragging(false)
{
}

bool Draggable::onBeginDrag(const ScreenPoint & clickPoint, int partId)
{
    m_partId = partId;
    m_dragging = true;
    m_clickPoint = clickPoint;
    onBeginDragImpl(clickPoint);
    return true;
}

void Draggable::onDrag(const ScreenPoint & dragPoint)
{
    onDragImpl(dragPoint);
}

void Draggable::onEndDrag()
{
    m_dragging = false;
    onEndDragImpl();
}

bool Draggable::onBeginDragImpl(const ScreenPoint & clickPoint)
{
    return true;
}

void Draggable::onDragImpl(const ScreenPoint & dragPoint)
{
}

void Draggable::onEndDragImpl()
{
}
